package com.fly.platform.base.pojo

import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableName
import com.fly.platform.common.constant.CommonConstant
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.math.BigDecimal

@ApiModel("权限")
@TableName("base_permission")
data class Permission(

        @ApiModelProperty(value = "菜单/权限名称")
        var name: String? = null,

        @ApiModelProperty(value = "始终显示 默认是")
        @TableField("show_always")
        var showAlways: Boolean? = true,

        @ApiModelProperty(value = "层级")
        var level: Int? = null,

        @ApiModelProperty(value = "类型 -1顶部菜单 0页面 1具体操作")
        var type: Int? = null,

        @ApiModelProperty(value = "菜单标题")
        var title: String? = null,

        @ApiModelProperty(value = "页面路径/资源链接url")
        var path: String? = null,

        @ApiModelProperty(value = "前端组件")
        var component: String? = null,

        @ApiModelProperty(value = "图标")
        var icon: String? = null,

        @ApiModelProperty(value = "按钮权限类型")
        var buttonType: String? = null,

        @ApiModelProperty(value = "父id")
        var parentId: String? = null,

        @ApiModelProperty(value = "说明备注")
        var description: String? = null,

        @ApiModelProperty(value = "排序值")
        var sortOrder: BigDecimal? = null,

        @ApiModelProperty(value = "是否启用 0启用 -1禁用")
        var status: Int = CommonConstant.STATUS_NORMAL,

        @ApiModelProperty(value = "网页链接")
        var url: String? = null

) : BasePojo() {

    companion object {

        const val serialVersionUID = 1L
    }
}